package com.ym.domain.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.Index;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.time.LocalDateTime;

@Data
@Table
@TableComment("域名操作记录表")
public class DmDomainOperateRecord {

    @IsKey
    @TableId(type = IdType.ASSIGN_ID)
    @Column
    @ColumnComment("主键ID")
    private Long id;

    @Column
    @ColumnComment("域名ID")
    @Index
    private Long domainId;

    @Column(length = 255)
    @ColumnComment("域名")
    private String domain;

    @Column(length = 20)
    @ColumnComment("操作类型(域名入库,域名出售,域名购买,域名设置DNS,域名解析,域名续费)")
    private String operationType;

    @Column(length = 20)
    @ColumnComment("操作人角色")
    private String operationRole;

    @Column(length = 20)
    @ColumnComment("操作人ID")
    private String operationId;

    @Column
    @ColumnComment("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
